import axios from '@/libs/api.request'

export const login = ({ username, password }) => {
  const data = {
    username,
    password
  }
  return axios.request({
    url: 'login/',
    data,
    method: 'post'
  })
}

export const ldapAuth = ({ username, password }) => {
  const data = {
    username,
    password
  }
  return axios.request({
    url: 'ldap/',
    data,
    method: 'post'
  })
}

export const getUserInfo = (token) => {
  return axios.request({
    url: 'get_info/',
    method: 'get'
  })
}
